<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="angular-route.js"></script>
</head>
<body>
<!-- <div ng-app="myApp" ng-controller="myAppControl">
	{{username}}
	<div ng-view></div>
</div>
<script type="text/javascript">
//简单路由
var myApp = angular.module('myApp',['ngRoute']);
myApp.config(['$routeProvider',function($routeProvider){
	$routeProvider.when('/a',{
		template : '这是a',
	}).when('/b',{
		template : '这是b'
	});
}]);
myApp.controller('myAppControl',function(){});
</script> -->
<div ng-app="myApp" ng-controller="myAppControl">
	<div ng-view></div>
	<script type="text/ng-template" id='a'><h1>你好A</h1></script>
	<script type="text/ng-template" id='b'><h1>你好B</h1></script>
</div>
<script type="text/javascript">
//简单路由
var myApp = angular.module('myApp',['ngRoute']);
myApp.config(['$routeProvider',function($routeProvider){
	$routeProvider.when('/a',{
		templateUrl : 'a',
	}).when('/b',{
		templateUrl : 'b'
	});
}]);
myApp.controller('myAppControl',function(){});
</script>
</body>
</html>